<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>03隐藏显示-土豆案例</title>
    <style>
        body {
            height: 3000px;
        }
        
        .box {
            position: relative;
            width: 234px;
            height: 156px;
            margin: 100px auto;
        }
        
        .box img {
            width: 100%;
            height: 100%;
        }
        
        .mask {
            position: absolute;
            /* 隐藏遮罩 */
            display: none;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .3) url('./images/play.png') no-repeat center;
        }
        
        .box:hover .mask {
            display: block;
        }
        
        .icon {
            width: 23px;
            height: 243px;
            background: rgba(0, 0, 0, .1) url(./images/icons.png) no-repeat -4px -10px;
        }
        
        .sanjiao {
            width: 0;
            height: 0;
            /* border: solid pink;
            border-width: 0 10px 10px 0;
            padding: 10px;
            transform: rotate(-45deg); */
            border-top: 50px solid #000;
            /* border-right: 50px solid pink;
            border-bottom: 50px solid rgb(199, 27, 27);
            border-left: 50px solid rgb(127, 27, 209); */
            border-right: 50px solid transparent;
            border-bottom: 50px solid transparent;
            border-left: 50px solid transparent;
        }
        
        .jd_box {
            position: relative;
            width: 200px;
            height: 300px;
            background: rgb(197, 179, 197);
        }
        
        .jd {
            position: absolute;
            top: 0;
            right: 15px;
            width: 0;
            height: 0;
            /* 照顾兼容性 */
            line-height: 0;
            /* 照顾兼容性 */
            font-size: 0;
            border: 10px solid transparent;
            border-bottom-color: tomato;
            margin-top: -20px;
        }
        
        .xiaomi {
            position: relative;
            width: 300px;
            height: 200px;
            background: green;
        }
        
        .xm {
            position: absolute;
            right: -20px;
            top: 50%;
            margin-top: -5px;
            height: 0;
            width: 0;
            /* 照顾兼容性 */
            line-height: 0;
            /* 照顾兼容性 */
            font-size: 0;
            border: 10px solid transparent;
            border-left-color: red;
        }
        
        textarea {
            resize: none;
            height: 340px;
            width: 450px;
            outline: none;
        }
        
        .img-div img {
            vertical-align: middle;
        }
        
        .overtext {
            width: 70px;
            height: 40px;
            /* overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap; */
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 20px;
        }
    </style>
</head>

<body>
    <div class="box">
        <a class="mask" title="点击跳转" target="_blank" href="https://www.bilibili.com/video/BV14J4114768?p=248&spm_id_from=pageDriver"></a>
        <img src="./images/box-bd2.png" alt="">
    </div>
    <div>雪碧图/精灵图:</div>
    <div class="icon"></div>
    <div class="sanjiao"></div>
    <div class="jd_box">
        <span class="jd"></span>
    </div>
    <div class="xiaomi">
        <span class="xm"></span>
    </div>
    <textarea name="" id="" cols="30" rows="10" placeholder="文本域尽量不换行"></textarea>
    <!-- 图片和图片之间有缝隙,推荐给图片加任意一个vertical-align: middle/top/bottom; 将图片转换为块元素：display:block;-->
    <div class="img-div">
        <img src="./images/second_floor.png" alt="">
    </div>
    <div class="img-div">
        <img src="./images/second_floor.png" alt="">
    </div>
    <!-- 文本溢出 -->
    <div class="overtext">这里是多行文本溢出</div>
</body>

</html>